#ifndef __CROSSFIRE_INPUT
#define __CROSSFIRE_INPUT

class CCF_Input
{
private:
  HINSTANCE m_inctance;
  LPDIRECTINPUT8 m_directInput;
  LPDIRECTINPUTDEVICE8 m_keyboardDevice;
  LPDIRECTINPUTDEVICE8 m_mouseDevice;

  char m_keyBuffer[256];
	int m_keyTime[256];
	DIMOUSESTATE2 m_mouseData;

public:
  CCF_Input(HINSTANCE instance);
  ~CCF_Input(void);

  BOOL InitDirect();
  BOOL InitMouse( HWND hwnd );
  BOOL InitKeyboard( HWND hwnd );
  BOOL QueryMouse();
  BOOL QueryKeyboard();

  BOOL Initialize( HWND hwnd );
  BOOL Update();

  BOOL IsKeyDown(char key);
  BOOL IsKeyPressAt( char key, int time );
  DIMOUSESTATE2* GetMouseState();
};

#endif